vim9script
# Theme: cyberpunk99
# Author: Olex Hryshchenko <greeschenko@gmail.com>
# License: MIT
# Origin: https://github.com/greeschenko/cyberpunk99.git

set background=dark
hi clear
syntax reset
set t_Co=256
g:colors_name = "cyberpunk99"

#syntax region MyHighlightGroup start=/\/\/.*$/ end=/$\n/me=e-2 skip=/\/\// contains=@Spell
#syntax match Function "<|>"

const palette = {
    "bg": "#1c0c0f",
    "black": "#1c0c0f",
    "darkred": "#873233",
    "red": "#ff6e66",
    "darkgreen": "#244c52",
    "green": "#1dcfb2",
    "yellow": "#ffda4d",
    "blue": "#307bd8",
    "magenta": "#fa4372",
    "cyan": "#6af7ff",
    "white": "#dbd4d0",
    "grey": "#505254"
}

const groups = {
    "Normal": { "guifg": palette.red, "guibg": palette.bg },
    "IncSearch": { "guibg": palette.yellow },
    "Title": { "link": "String" },
    "NonText": { "guifg": palette.grey },
    "LineNr": { "guifg": palette.darkred },
    "Comment": { "guifg": palette.darkgreen},

    "String": { "guifg": palette.cyan },
    "Boolean": { "guifg": palette.green },
    "Number": { "link": "Boolean" },
    "Float": { "link": "Boolean" },
    "Keyword": { "link": "Boolean" },
    "SpecialKey": { "link": "Boolean" },
    "Operator": { "link": "Boolean" },
    "Constant": { "link": "Boolean" },
    "Character": { "link": "Boolean" },
    "Type": { "guifg": palette.magenta },
    "StorageClass": { "link": "Type" },
    "Structure": { "link": "Type" },
    "Typedef": { "link": "Type" },
    "Function": { "guifg": palette.blue },
    "Statement": { "link": "Function" },
    "Conditional": { "link": "String" },
    "Repeat": { "link": "Function" },
    "Label": { "link": "Function" },
    "Identifier": { "guifg": palette.yellow },
    "Exception": { "link": "Identifier" },
    "PreProc": { "link": "Identifier" },
    "Include": { "link": "Identifier" },
    "Define": { "link": "Identifier" },
    "Macro": { "link": "Identifier" },
    "PreCondit": { "link": "Identifier" },

    "Special": { "guifg": palette.yellow },
    "Error": { "guifg": palette.white, "guibg": palette.red },
    "ErrorMsg": { "link": "Error" },

    "Pmenu": { "guifg": palette.cyan, "guibg": palette.black },
    "PmenuSel": { "guifg": palette.magenta, "guibg": palette.black, "gui": "bold"},
    "PmenuSbar": { "guibg": palette.darkgreen },
    "PmenuThumb": { "guibg": palette.magenta },

    "CursorLine": { "guibg": palette.darkred,  "gui": "none", "cterm": "none" },
    "CursorLineNr": { "link": "CursorLine" },
    "CursorColumn": { "link": "CursorLine" },
    "ColorColumn": { "link": "CursorLine" },
    "Visual": { "link": "CursorLine" },

    "Folded": { "guifg": palette.magenta},
    "FoldColumn": { "link": "Folded" },
    "VertSplit": { "link": "Comment" },
    "MatchParen": { "guifg": palette.white, "guibg": palette.bg },

    "WildMenu": { "guifg": palette.magenta },
    "StatusLine": { "guibg": palette.bg, "guifg": palette.cyan },
    "StatusLineNC": { "guibg": palette.bg, "guifg": palette.cyan },

    "SignColumn": { "guibg": palette.bg },

    "Cursor": { "guibg": palette.magenta },
    "vCursor": { "link": "Cursor" },
    "iCursor": { "link": "Cursor" },
    "lCursor": { "link": "Cursor" },

    "Todo": { "link": "IncSearch" },

    "EasyMotionTarget": { "link": "Search" },
    "EasyMotionShade": { "link": "Comment" },
    "Sneak": { "link": "Search" },
    "SneakLabel": { "link": "Search" },

    "diffAdded": { "link": "Boolean" },
    "diffRemoved": { "link": "Normal" },
    "diffChanged": { "link": "Function" },
    "diffFile": { "link": "Identifier" },
    "diffNewFile": { "link": "Identifier" },
    "diffLine": { "link": "Function" },

    "htmlTag": { "link": "String" },
    "htmlEndTag": { "link": "String" },
    "htmlTagName": { "link": "Normal" },
    "htmlArg": { "link": "Normal" },
    "htmlScriptTag": { "link": "Type" },
    "htmlTagN": { "link": "String" },
    "htmlSpecialTagName": { "link": "Function" },
    "htmlSpecialChar": { "link": "Identifier" },
    "htmlLink": { "link": "Identifier" },
    "htmlBold": { "link": "Identifier" },
    "htmlBoldUnderline": { "link": "Identifier" },
    "htmlBoldItalic": { "link": "Identifier" },
    "htmlBoldUnderlineItalic": { "link": "Identifier" },
    "htmlUnderline": { "link": "Identifier" },
    "htmlUnderlineItalic": { "link": "Identifier" },
    "htmlItalic": { "link": "Identifier" },

    "xmlTag": { "link": "Function" },
    "xmlEndTag": { "link": "Function" },
    "xmlTagName": { "link": "Function" },
    "xmlEqual": { "link": "Function" },
    "docbkKeyword": { "link": "Function" },
    "xmlDocTypeDecl": { "link": "NonText" },
    "xmlDocTypeKeyword": { "link": "Type" },
    "xmlCdataStart": { "link": "NonText" },
    "xmlCdataCdata": { "link": "Type" },
    "dtdFunction": { "link": "NonText" },
    "dtdTagName": { "link": "Type" },
    "xmlAttrib": { "link": "Function" },
    "xmlProcessingDelim": { "link": "NonText" },
    "dtdParamEntityPunct": { "link": "NonText" },
    "dtdParamEntityDPunct": { "link": "NonText" },
    "xmlAttribPunct": { "link": "NonText" },
    "xmlEntity": { "link": "Identifier" },
    "xmlEntityPunct": { "link": "Identifier" },

    "vimNotation": { "link": "Constant" },
    "vimBracket": { "link": "String" },
    "vimMapModKey": { "link": "Constant" },
    "vimFuncSID": { "link": "Function" },
    "vimSetSep": { "link": "Function" },
    "vimSep": { "link": "String" },
    "vimContinue": { "link": "Function" },
    "vimParenSep": { "link": "String" },
    "vimConst": { "link": "Constant" },
    "vimFuncKey": { "link": "String" },
    "vimNotFunc": { "link": "String" },
    "vimFuncName": { "link": "Normal" },
    "vimVar": { "link": "Normal" },
    "vimOption": { "link": "Constant" },
    "vimCommand": { "link": "String" },
    "helpExample": { "link": "String" },

    "clojureKeyword": { "link": "Function" },
    "clojureCond": { "link": "Identifier" },
    "clojureSpecial": { "link": "Identifier" },
    "clojureDefine": { "link": "Identifier" },
    "clojureFunc": { "link": "Identifier" },
    "clojureRepeat": { "link": "Identifier" },
    "clojureCharacter": { "link": "Function" },
    "clojureStringEscape": { "link": "Function" },
    "clojureException": { "link": "Normal" },
    "clojureRegexp": { "link": "Function" },
    "clojureRegexpEscape": { "link": "Function" },
    "clojureRegexpMod": { "link": "clojureRegexpCharClass" },
    "clojureRegexpQuantifier": { "link": "clojureRegexpCharClass" },
    "clojureParen": { "link": "Function" },
    "clojureAnonArg": { "link": "Identifier" },
    "clojureVariable": { "link": "Function" },
    "clojureMacro": { "link": "Identifier" },
    "clojureMeta": { "link": "Identifier" },
    "clojureDeref": { "link": "Identifier" },
    "clojureQuote": { "link": "Identifier" },
    "clojureUnquote": { "link": "Identifier" },
    "clojureRegexpCharClass": { "link": "Type" },


    "cOperator": { "link": "Type" },
    "cStructure": { "link": "Identifier" },

    "pythonBuiltin": { "link": "Identifier" },
    "pythonBuiltinObj": { "link": "Identifier" },
    "pythonBuiltinFunc": { "link": "Identifier" },
    "pythonFunction": { "link": "Function" },
    "pythonDecorator": { "link": "Normal" },
    "pythonInclude": { "link": "Function" },
    "pythonImport": { "link": "Function" },
    "pythonRun": { "link": "Function" },
    "pythonCoding": { "link": "Function" },
    "pythonOperator": { "link": "Normal" },
    "pythonException": { "link": "Normal" },
    "pythonExceptions": { "link": "Type" },
    "pythonBoolean": { "link": "Type" },
    "pythonDot": { "link": "Function" },
    "pythonConditional": { "link": "Normal" },
    "pythonRepeat": { "link": "Normal" },
    "pythonDottedName": { "link": "BooleanBold" },

    "cssBraces": { "link": "Function" },
    "cssFunctionName": { "link": "Identifier" },
    "cssIdentifier": { "link": "Identifier" },
    "cssClassName": { "link": "Boolean" },
    "cssColor": { "link": "Function" },
    "cssSelectorOp": { "link": "Function" },
    "cssSelectorOp2": { "link": "Function" },
    "cssImportant": { "link": "Boolean" },
    "cssVendor": { "link": "String" },
    "cssTextProp": { "link": "Function" },
    "cssAnimationProp": { "link": "Function" },
    "cssUIProp": { "link": "Identifier" },
    "cssTransformProp": { "link": "Function" },
    "cssTransitionProp": { "link": "Function" },
    "cssPrintProp": { "link": "Function" },
    "cssPositioningProp": { "link": "Identifier" },
    "cssBoxProp": { "link": "Function" },
    "cssFontDescriptorProp": { "link": "Function" },
    "cssFlexibleBoxProp": { "link": "Function" },
    "cssBorderOutlineProp": { "link": "Function" },
    "cssBackgroundProp": { "link": "Function" },
    "cssMarginProp": { "link": "Function" },
    "cssListProp": { "link": "Function" },
    "cssTableProp": { "link": "Function" },
    "cssFontProp": { "link": "Function" },
    "cssPaddingProp": { "link": "Function" },
    "cssDimensionProp": { "link": "Function" },
    "cssRenderProp": { "link": "Function" },
    "cssColorProp": { "link": "Function" },
    "cssGeneratedContentProp": { "link": "Function" },

    "javaScriptBraces": { "link": "String" },
    "javaScriptFunction": { "link": "Function" },
    "javaScriptIdentifier": { "link": "Normal" },
    "javaScriptMember": { "link": "Function" },
    "javaScriptNumber": { "link": "Type" },
    "javaScriptNull": { "link": "Type" },
    "javaScriptParens": { "link": "String" },
    "javascriptImport": { "link": "Function" },
    "javascriptExport": { "link": "Function" },
    "javascriptClassKeyword": { "link": "Function" },
    "javascriptClassExtends": { "link": "Function" },
    "javascriptDefault": { "link": "Function" },
    "javascriptClassName": { "link": "Identifier" },
    "javascriptClassSuperName": { "link": "Identifier" },
    "javascriptGlobal": { "link": "Identifier" },
    "javascriptEndColons": { "link": "String" },
    "javascriptFuncArg": { "link": "String" },
    "javascriptGlobalMethod": { "link": "String" },
    "javascriptNodeGlobal": { "link": "String" },
    "javascriptBOMWindowProp": { "link": "String" },
    "javascriptArrayMethod": { "link": "String" },
    "javascriptArrayStaticMethod": { "link": "String" },
    "javascriptCacheMethod": { "link": "String" },
    "javascriptDateMethod": { "link": "String" },
    "javascriptMathStaticMethod": { "link": "String" },
    "javascriptURLUtilsProp": { "link": "String" },
    "javascriptBOMNavigatorProp": { "link": "String" },
    "javascriptDOMDocMethod": { "link": "String" },
    "javascriptDOMDocProp": { "link": "String" },
    "javascriptBOMLocationMethod": { "link": "String" },
    "javascriptBOMWindowMethod": { "link": "String" },
    "javascriptStringMethod": { "link": "String" },
    "javascriptVariable": { "link": "Identifier" },
    "javascriptIdentifier": { "link": "Identifier" },
    "javascriptClassSuper": { "link": "Identifier" },
    "javascriptFuncKeyword": { "link": "Function" },
    "javascriptAsyncFunc": { "link": "Function" },
    "javascriptClassStatic": { "link": "Identifier" },
    "javascriptOperator": { "link": "Normal" },
    "javascriptForOperator": { "link": "Normal" },
    "javascriptYield": { "link": "Normal" },
    "javascriptExceptions": { "link": "Normal" },
    "javascriptMessage": { "link": "Normal" },
    "javascriptTemplateSB": { "link": "Function" },
    "javascriptTemplateSubstitution": { "link": "String" },
    "javascriptLabel": { "link": "String" },
    "javascriptObjectLabel": { "link": "String" },
    "javascriptPropertyName": { "link": "String" },
    "javascriptLogicSymbols": { "link": "String" },
    "javascriptArrowFunc": { "link": "Identifier" },
    "javascriptDocParamName": { "link": "Identifier" },
    "javascriptDocTags": { "link": "Identifier" },
    "javascriptDocNotation": { "link": "Identifier" },
    "javascriptDocParamType": { "link": "Identifier" },
    "javascriptDocNamedParamType": { "link": "Identifier" },
    "javascriptBrackets": { "link": "String" },
    "javascriptDOMElemAttrs": { "link": "String" },
    "javascriptDOMEventMethod": { "link": "String" },
    "javascriptDOMNodeMethod": { "link": "String" },
    "javascriptDOMStorageMethod": { "link": "String" },
    "javascriptHeadersMethod": { "link": "String" },
    "javascriptAsyncFuncKeyword": { "link": "Normal" },
    "javascriptAwaitFuncKeyword": { "link": "Normal" },
    "javaScriptStringT": { "link": "String" },
    "javaScriptEmbed": { "link": "Normal" },


    "jsClassKeyword": { "link": "Function" },
    "jsExtendsKeyword": { "link": "Function" },
    "jsExportDefault": { "link": "Function" },
    "jsTemplateBraces": { "link": "Function" },
    "jsGlobalNodeObjects": { "link": "String" },
    "jsGlobalObjects": { "link": "String" },
    "jsFunction": { "link": "Function" },
    "jsFuncParens": { "link": "Function" },
    "jsParens": { "link": "Function" },
    "jsNull": { "link": "Type" },
    "jsUndefined": { "link": "Type" },
    "jsClassDefinition": { "link": "Identifier" },

    "typeScriptReserved": { "link": "Function" },
    "typeScriptLabel": { "link": "Function" },
    "typeScriptFuncKeyword": { "link": "Function" },
    "typeScriptIdentifier": { "link": "Identifier" },
    "typeScriptBraces": { "link": "String" },
    "typeScriptEndColons": { "link": "String" },
    "typeScriptDOMObjects": { "link": "String" },
    "typeScriptAjaxMethods": { "link": "String" },
    "typeScriptLogicSymbols": { "link": "String" },
    "typeScriptDocSeeTag": { "link": "Comment" },
    "typeScriptDocParam": { "link": "Comment" },
    "typeScriptDocTags": { "link": "vimCommentTitle" },
    "typeScriptGlobalObjects": { "link": "String" },
    "typeScriptParens": { "link": "Function" },
    "typeScriptOpSymbols": { "link": "Function" },
    "typeScriptHtmlElemProperties": { "link": "String" },
    "typeScriptNull": { "link": "Type" },
    "typeScriptInterpolationDelimiter": { "link": "Function" },

    "purescriptModuleKeyword": { "link": "Function" },
    "purescriptModuleName": { "link": "String" },
    "purescriptWhere": { "link": "Function" },
    "purescriptDelimiter": { "link": "Identifier" },
    "purescriptType": { "link": "String" },
    "purescriptImportKeyword": { "link": "Function" },
    "purescriptHidingKeyword": { "link": "Function" },
    "purescriptAsKeyword": { "link": "Function" },
    "purescriptStructure": { "link": "Function" },
    "purescriptOperator": { "link": "Function" },
    "purescriptTypeVar": { "link": "String" },
    "purescriptConstructor": { "link": "String" },
    "purescriptFunction": { "link": "String" },
    "purescriptConditional": { "link": "Identifier" },
    "purescriptBacktick": { "link": "Identifier" },

    "coffeeExtendedOp": { "link": "Function" },
    "coffeeSpecialOp": { "link": "Function" },
    "coffeeCurly": { "link": "Identifier" },
    "coffeeParen": { "link": "Function" },
    "coffeeBracket": { "link": "Identifier" },

    "rubyStringDelimiter": { "link": "Boolean" },
    "rubyInterpolationDelimiter": { "link": "Function" },

    "objcTypeModifier": { "link": "Normal" },
    "objcDirective": { "link": "Function" },

    "goDirective": { "link": "Function" },
    "goConstants": { "link": "Type" },
    "goDeclaration": { "link": "Function" },
    "goDeclType": { "link": "Function" },
    "goBuiltins": { "link": "Identifier" },
    "goParen": { "link": "Boolean" },
    "goVarArgs": { "link": "Identifier" },
    "goGenerate": { "link": "Identifier" },
    "goReceiver": { "link": "Identifier" },
    "goParamName": { "link": "Identifier" },
    "goParamType": { "link": "Type" },
    "goSingleDecl": { "link": "Identifier" },
    "goTypeParams": { "link": "Identifier" },
    "goReceiverVar": { "link": "Identifier" },
    "goReceiverType": { "link": "Type" },
    "goSimpleParams": { "link": "Identifier" },
    "goReceiverDecl": { "link": "Identifier" },
    "goBuildKeyword": { "link": "Keyword" },
    "goPointerOperator": { "link": "Identifier" },
    "goBuildDirectives": { "link": "Identifier" },
    "goGenerateVariables": { "link": "Identifier" },
    "goBlock": { "link": "Identifier" },
    "goFunctionReturn": { "link": "Identifier" },

    "luaIn": { "link": "Normal" },
    "luaFunction": { "link": "Function" },
    "luaTable": { "link": "Identifier" },

    "moonSpecialOp": { "link": "Function" },
    "moonExtendedOp": { "link": "Function" },
    "moonFunction": { "link": "Function" },
    "moonObject": { "link": "Identifier" },

    "javaAnnotation": { "link": "Function" },
    "javaDocTags": { "link": "Function" },
    "javaCommentTitle": { "link": "vimCommentTitle" },
    "javaParen": { "link": "Function" },
    "javaParen1": { "link": "Function" },
    "javaParen2": { "link": "Function" },
    "javaParen3": { "link": "Function" },
    "javaParen4": { "link": "Function" },
    "javaParen5": { "link": "Function" },
    "javaOperator": { "link": "Identifier" },
    "javaVarArg": { "link": "Boolean" },

    "elixirDocString": { "link": "Comment" },
    "elixirStringDelimiter": { "link": "Boolean" },
    "elixirInterpolationDelimiter": { "link": "Function" },
    "elixirModuleDeclaration": { "link": "Identifier" },

    "scalaNameDefinition": { "link": "String" },
    "scalaCaseFollowing": { "link": "String" },
    "scalaCapitalWord": { "link": "String" },
    "scalaTypeExtension": { "link": "String" },
    "scalaKeyword": { "link": "Normal" },
    "scalaKeywordModifier": { "link": "Normal" },
    "scalaSpecial": { "link": "Function" },
    "scalaOperator": { "link": "String" },
    "scalaTypeDeclaration": { "link": "Identifier" },
    "scalaTypeTypePostDeclaration": { "link": "Identifier" },
    "scalaInstanceDeclaration": { "link": "String" },
    "scalaInterpolation": { "link": "Function" },

    "markdownH1": { "link": "BooleanBold" },
    "markdownH2": { "link": "BooleanBold" },
    "markdownH3": { "link": "IdentifierBold" },
    "markdownH4": { "link": "IdentifierBold" },
    "markdownH5": { "link": "Identifier" },
    "markdownH6": { "link": "Identifier" },
    "markdownCode": { "link": "Function" },
    "markdownCodeBlock": { "link": "Function" },
    "markdownCodeDelimiter": { "link": "Function" },
    "markdownBlockquote": { "link": "NonText" },
    "markdownListMarker": { "link": "NonText" },
    "markdownOrderedListMarker": { "link": "NonText" },
    "markdownRule": { "link": "NonText" },
    "markdownHeadingRule": { "link": "NonText" },
    "markdownUrlDelimiter": { "link": "Function" },
    "markdownLinkDelimiter": { "link": "Function" },
    "markdownLinkTextDelimiter": { "link": "Function" },
    "markdownHeadingDelimiter": { "link": "Identifier" },
    "markdownUrl": { "link": "Type" },
    "markdownUrlTitleDelimiter": { "link": "Boolean" },
    "markdownIdDeclaration": { "link": "markdownLinkText" },
    "markdownItalic": { "link": "markdownLinkText" },
    "markdownLinkText": { "link": "markdownLinkText" },

    "haskellType": { "link": "String" },
    "haskellIdentifier": { "link": "String" },
    "haskellSeparator": { "link": "String" },
    "haskellDelimiter": { "link": "Identifier" },
    "haskellOperators": { "link": "Function" },
    "haskellBacktick": { "link": "Identifier" },
    "haskellStatement": { "link": "Identifier" },
    "haskellConditional": { "link": "Identifier" },
    "haskellLet": { "link": "Function" },
    "haskellDefault": { "link": "Function" },
    "haskellWhere": { "link": "Function" },
    "haskellBottom": { "link": "Function" },
    "haskellBlockKeywords": { "link": "Function" },
    "haskellImportKeywords": { "link": "Function" },
    "haskellDeclKeyword": { "link": "Function" },
    "haskellDeriving": { "link": "Function" },
    "haskellAssocType": { "link": "Function" },
    "haskellNumber": { "link": "Type" },
    "haskellPragma": { "link": "Type" },
    "haskellString": { "link": "Boolean" },
    "haskellChar": { "link": "Boolean" },

    "jsonKeyword": { "link": "Boolean" },
    "jsonQuote": { "link": "Boolean" },
    "jsonBraces": { "link": "String" },
    "jsonString": { "link": "String" },


    "ScopeMenuMatch": { "link": "Special" },
    "ScopeMenuVirtualText": { "link": "Comment" },
    "ScopeMenuSubtle": { "link": "String" },
    "ScopeMenuCurrent": { "link": "Special" },


###    'DiffDelete'
###    'DiffAdd'
###    'DiffChange'
###    'DiffText'
###    'DiffChange'
###    'DiffText'
###    'SpellCap'
###    'SpellCap'
###    'SpellBad'
###    'SpellLocal'
###    'SpellRare'
}

for key in groups->keys()
    var tmphi: string = "hi!"
    exe "hi clear " .. key
    tmphi = tmphi .. " " .. key
    for j in groups[key]->keys()
        tmphi = tmphi .. " "
        tmphi = tmphi .. j
        if j != "link"
            tmphi = tmphi .. "="
            tmphi = tmphi .. groups[key][j]
        else
            tmphi = "hi link " .. key .. " " .. groups[key][j]
        endif
    endfor
    #echom tmphi 
    exe tmphi
endfor

